fix(application deploy): guarantee a terminal result/error NDJSON event (DEVX-544)#114
Merged
jpage-godaddy merged 2 commits intoJul 17, 2026
Conversation
…nt (DEVX-544)
`deploy --follow` streams progress events, but on failure the human-readable
error was rendered to a buffer that never reached the NDJSON stream, leaving
callers with no structured terminal signal. On success the last line was an
ordinary step event, not a distinguishable terminal marker.
Every failure point (auth, config read, application/release lookup, extension
deploy, activation) now emits a terminal {"type":"error",...} event before
propagating, reusing cli_engine::build_error_envelope for consistent
code/message. Success now ends with a {"type":"result",...} event. Also fixes
a latent bug where a duplicate "name" JSON key silently dropped the literal
step name.
jpage-godaddy
approved these changes
Jul 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures gddy application deploy --follow produces a clear, structured terminal NDJSON event on both success and failure, so stream consumers always receive a final machine-readable result/error signal.
Changes:
- Added helpers to emit a terminal
type:"error"NDJSON event (usingcli_engine::build_error_envelopefor consistent code/message) on all deploy failure paths. - Added a terminal
type:"result"NDJSON event on successful deploy completion with a summary payload andnext_actions. - Fixed the deploy “completed” step event to avoid duplicate JSON keys by renaming the application field.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Attach the deployed application name to the terminal result action so agent callers can resolve its placeholder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gddy application deploy --followstreams NDJSON progress events, but on failure the error was rendered to a separate human-readable buffer that never reached the stream — a caller consuming the stream line-by-line just saw it stop, with no structured terminal signal. On success, the last line was an ordinarystepevent, not a distinguishable terminal marker.{"type":"error","ok":false,"error":{code,message},...}event before propagating the error, reusingcli_engine::build_error_envelopeso the code/message match what a non-streaming command would render for the same error.{"type":"result","ok":true,"result":{...},"next_actions":[...]}event."name"JSON key silently dropped the literal"deploy"step name.Test plan
cargo test— full suite passes (251/251)cargo clippy --all-targets -- -D warnings— cleancargo fmt --check— clean